package com.dawan.sbjy.util;

import com.dawan.sbjy.Config.Result;

public class ResultUtil {
    public static Result success(Object object,String msg) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg(msg);
        result.setData(object);
        return result;
    }

    public static Result success() {
        return success(null,"成功");
    }

    public static Result error(Object object,String msg) {
        Result result = new Result();
        result.setCode(500);
        result.setMsg(msg);
        result.setData(object);
        return result;
    }
    public static Result error() {
        return success(null,"失败");
    }
}
